package com.jxb.demo.event;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * @desc 事件发布者
 */
@Component
public class MsgPublisher {


    @Autowired
    private ApplicationContext applicationContext;

    public void pulishMsgEvent(MsgEvent msgEvent){
        applicationContext.publishEvent(msgEvent);
    }

}
